import request from "@/config/axios/service";

//生产料号
export function AddProduce(data) {
  return request({
    url: "/AvpProduct/Add",
    method: "post",
    data,
  });
}
export function updateProduce(data) {
  return request({
    url: "/AvpProduct/Update",
    method: "put",
    data,
  });
}
export function getProduce(params) {
  return request({
    url: "/AvpProduct/GetPageList",
    method: "get",
    params,
  });
}
//物料料号
export function AddMaterial(data) {
  return request({
    url: "/AvpMaterial/Add",
    method: "post",
    data,
  });
}
export function updateMaterial(data) {
  return request({
    url: "/AvpMaterial/Update",
    method: "put",
    data,
  });
}
export function getMaterial(params) {
  return request({
    url: "/AvpMaterial/GetPageList",
    method: "get",
    params,
  });
}

//生产辅料
export function AddAuxiliary(data) {
  return request({
    url: "/AvpProductMaterial/Add",
    method: "post",
    data,
  });
}
export function updateAuxiliary(data) {
  return request({
    url: "/AvpProductMaterial/Update",
    method: "put",
    data,
  });
}
export function getAuxiliary(params) {
  return request({
    url: "/AvpProductMaterial/GetPageList",
    method: "get",
    params,
  });
}

//仓库
export function AddInventory(data) {
  return request({
    url: "/AvpInventory/Add",
    method: "post",
    data,
  });
}
export function updateInventory(data) {
  return request({
    url: "/AvpInventory/Update",
    method: "put",
    data,
  });
}
export function getInventory(params) {
  return request({
    url: "/AvpInventory/GetPageList",
    method: "get",
    params,
  });
}
//库存
export function AddOnhand(data) {
  return request({
    url: "/AvpOnhand/Add",
    method: "post",
    data,
  });
}
export function updateOnhand(data) {
  return request({
    url: "/AvpOnhand/Update",
    method: "put",
    data,
  });
}
export function getOnhand(params) {
  return request({
    url: "/AvpOnhand/GetPageList",
    method: "get",
    params,
  });
}
